
<form name="editForm" role="form" novalidate ng-submit="vm.save()" show-validation>

    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"
                ng-click="vm.clear()">&times;</button>
        <h4 class="modal-title" id="myUserExtendLabel" translate="weiyouquApp.userExtend.home.createOrEditLabel">Create or edit a User Extend</h4>
    </div>
    <div class="modal-body">
        <jhi-alert-error></jhi-alert-error>
        <div class="form-group" ng-show="vm.userExtend.id">
            <label for="id" translate="global.field.id">ID</label>
            <input type="text" class="form-control" id="id" name="id"
                    ng-model="vm.userExtend.id" readonly />
        </div>
        <div class="form-group">
            <label class="control-label" translate="weiyouquApp.userExtend.login" for="field_login">Login</label>
            <input type="text" class="form-control" name="login" id="field_login"
                    ng-model="vm.userExtend.login"
                    required />
            <div ng-show="editForm.login.$invalid">
                <p class="help-block"
                    ng-show="editForm.login.$error.required" translate="entity.validation.required">
                    This field is required.
                </p>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label" translate="weiyouquApp.userExtend.icon" for="field_icon">Icon</label>
            <input type="text" class="form-control" name="icon" id="field_icon"
                    ng-model="vm.userExtend.icon"
                    ng-pattern="/^[a-zA-z]+://[^\s]*$/" />
            <div ng-show="editForm.icon.$invalid">
                <p class="help-block"
                    ng-show="editForm.icon.$error.pattern" translate="entity.validation.pattern" translate-value-pattern="^[a-zA-z]+://[^\s]*$">
                    This field should follow pattern "^[a-zA-z]+://[^\s]*$".
                </p>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label" translate="weiyouquApp.userExtend.name" for="field_name">Name</label>
            <input type="text" class="form-control" name="name" id="field_name"
                    ng-model="vm.userExtend.name"
                     />
        </div>
        <div class="form-group">
            <label class="control-label" translate="weiyouquApp.userExtend.gender" for="field_gender">Gender</label>
            <input type="number" class="form-control" name="gender" id="field_gender"
                    ng-model="vm.userExtend.gender"
                    min="0" max="2" />
            <div ng-show="editForm.gender.$invalid">
                <p class="help-block"
                    ng-show="editForm.gender.$error.min" translate="entity.validation.min" translate-value-min="0">
                    This field should be more than 0.
                </p>
                <p class="help-block"
                    ng-show="editForm.gender.$error.max" translate="entity.validation.max" translate-value-max="2">
                    This field cannot be more than 2.
                </p>
                <p class="help-block"
                    ng-show="editForm.gender.$error.number" translate="entity.validation.number">
                    This field should be a number.
                </p>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label" translate="weiyouquApp.userExtend.birthday" for="field_birthday">Birthday</label>
                <div class="input-group">
                    <input id="field_birthday" type="text" class="form-control" name="birthday" uib-datepicker-popup="{{dateformat}}" ng-model="vm.userExtend.birthday" is-open="vm.datePickerOpenStatus.birthday"
                    />
                    <span class="input-group-btn">
                        <button type="button" class="btn btn-default" ng-click="vm.openCalendar('birthday')"><i class="glyphicon glyphicon-calendar"></i></button>
                    </span>
                </div>
        </div>
        <div class="form-group">
            <label class="control-label" translate="weiyouquApp.userExtend.education" for="field_education">Education</label>
            <input type="text" class="form-control" name="education" id="field_education"
                    ng-model="vm.userExtend.education"
                     />
        </div>
        <div class="form-group">
            <label class="control-label" translate="weiyouquApp.userExtend.profession" for="field_profession">Profession</label>
            <input type="text" class="form-control" name="profession" id="field_profession"
                    ng-model="vm.userExtend.profession"
                     />
        </div>
        <div class="form-group">
            <label class="control-label" translate="weiyouquApp.userExtend.income" for="field_income">Income</label>
            <input type="text" class="form-control" name="income" id="field_income"
                    ng-model="vm.userExtend.income"
                     />
        </div>
        <div class="form-group">
            <label class="control-label" translate="weiyouquApp.userExtend.interest" for="field_interest">Interest</label>
            <input type="text" class="form-control" name="interest" id="field_interest"
                    ng-model="vm.userExtend.interest"
                     />
        </div>

    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="vm.clear()">
            <span class="glyphicon glyphicon-ban-circle"></span>&nbsp;<span translate="entity.action.cancel">Cancel</span>
        </button>
        <button type="submit" ng-disabled="editForm.$invalid || vm.isSaving" class="btn btn-primary">
            <span class="glyphicon glyphicon-save"></span>&nbsp;<span translate="entity.action.save">Save</span>
        </button>
    </div>
</form>
